
<!DOCTYPE HTML>
<html xmlns:th="http://www.thymeleaf.org">
<head>
    <title>XXX医院信息管理系统</title>
    <meta http-equiv="Content-Type" content="text/html; charset=utf-8" />
    <link th:href="@{/Hospital/assets/css/dpl-min.css}" rel="stylesheet" type="text/css" />
    <link th:href="@{/Hospital/assets/css/bui-min.css}" rel="stylesheet" type="text/css" />
    <link th:href="@{/Hospital/assets/css/main-min.css}" rel="stylesheet" type="text/css" />
</head>
<body>


<!--<div class="header">

    <div class="dl-title">
        <img src="/chinapost/Public/assets/img/top.png">
    </div>

    <div class="dl-log">欢迎您，<span class="dl-log-user">张三</span><a href="/chinapost/index.php?m=Public&a=logout" title="退出系统" class="dl-log-quit">[退出]</a>
    </div>
</div>-->
<div class="content">
    <div class="dl-main-nav">
        <div class="dl-inform"><div class="dl-inform-title"><s class="dl-inform-icon dl-up"></s></div></div>
        <ul id="J_Nav"  class="nav-list ks-clear" style="float:left">
            <!--<li class="nav-item dl-selected"><div class="nav-item-inner nav-home">信息采编系统</div></li>-->
			<li style=" color:#fff; font-size:20px; margin-top:10px; margin-left:20px;">XXX医院管理平台</li>
		</ul>
		<div  style="float:right; color:#fff;">欢迎您，<span class="dl-log-user">---</span><a href="javascript:logout()" title="退出系统" class="dl-log-quit">[退出]</a></div>
    </div>
	
    <ul id="J_NavContent" class="dl-tab-conten">
    </ul>
</div>
<script type="text/javascript" th:src="@{/Hospital/assets/js/jquery-1.6.js}"></script>
<script type="text/javascript" th:src="@{/Hospital/assets/js/bui.js}"></script>
<script type="text/javascript" th:src="@{/Hospital/assets/js/common/main-min.js}"></script>
<script type="text/javascript" th:src="@{/Hospital/assets/js/config-min.js}"></script>
<script th:src="@{/Hospital/layer/layer.js}"></script>


<script>
    BUI.use('common/main',function(){
        //获取数据
        $.getJSON("userMenuInfo",function (data){
            if (data.status === 1){
                let list = data.list;
                let items = [];
                let config = [];

                $.each(list,function (index,item){
                    let itemId = item.m_id;
                    let itemText = item.m_chineseName;
                    let itemHref = item.m_name;

                    items.push({id:itemId, text:itemText, href:itemHref});
                })
                //构造数据也太难了吧。。。。。竟用了一上午
                config.push({id:0,menu: [{text:"快速通道",items:items}]});
                //console.log(config);
                new PageUtil.MainPage({modulesConfig : config});
            }
        })

    });
</script>
</body>
</html>
<script>
    //默认加载事件
    $(function (){
        loginData();
    })

    //退出事件
    function logout(){
        if (confirm("是否退出？")){
            //删除session记录
            $.get("logout",null,function (){
                //跳转到登录页
                window.location.href="login";
            })
        }
    }

    //获取登录数据
    function loginData(){
        //登录值还是得session值获取
        $.get("getSession",null,function (data){

            let userName = data.u_loginName;
            $(".dl-log-user").html(userName);
        })
    }
</script>